package com.syz.mall.job;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Scheduled;


@Configuration
public class delCatgoryRedis {
    @Autowired
    private RedisTemplate redisTemplate;

    @Scheduled(cron = "0 0/30 * * * ?")
    public void deleteCategoryRedis() {
        redisTemplate.delete("topCategoryList");
        redisTemplate.delete("secondCategoryList");
    }
}
